<template>
<div>
     用户名：<input type="text" v-model="user.username">
    密码：<input type="text" v-model="user.password">
    <button @click="login">提交</button>
</div>

</template>

<script>
import axios from '../../units/require.js'
// import 
export default {
data(){
return {
user:{
        username:'',
        password:''
   }

}

},
methods: {
     login(){
        axios.post('/login',this.user).then(res=>console.log(res)).catch(err=>console.log(err))
    }
    }
}
</script>
<style lang='less' scoped>

</style>
